Skip to content

chore: update core api #597

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from
Draft

chore: update core api #597

wants to merge 15 commits into from

Conversation

manuel3108
Copy link
Member

Relates #24
Relates #85
Closes #557

Copy link

changeset-bot bot commented Jun 19, 2025

⚠️ No Changeset found

Latest commit: 83d06dd

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@svelte-docs-bot
Copy link

Copy link

pkg-pr-new bot commented Jun 19, 2025

Open in StackBlitz

npx https://pkg.pr.new/sveltejs/cli/sv@597
npx https://pkg.pr.new/sveltejs/cli/svelte-migrate@597

commit: 83d06dd

@manuel3108 manuel3108 requested a review from Copilot June 19, 2025 16:35
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the core API to use a consistent options object pattern across many functions, replacing multiple positional parameters with a single options object. The changes update function signatures and usages for variable declarations, object property handlers, import/export utilities, function calls, and array operations across the codebase and its tests, as well as align the addon integrations with the new API.

Reviewed Changes

Copilot reviewed 59 out of 63 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/core/tooling/js/variables.ts Refactored variable declaration and identifier creation functions to accept an options object.
packages/core/tooling/js/object.ts Updated object property and override functions with options objects.
packages/core/tooling/js/kit.ts Modified global interface and hooks functions to use the new options-based API.
packages/core/tooling/js/imports.ts Consolidated import functions to accept options objects instead of discrete parameters.
packages/core/tooling/js/function.ts Renamed and refactored call and arrow function helpers (to createCall/createArrow) with options.
packages/core/tooling/js/exports.ts Updated export creation functions to match the options object pattern.
packages/core/tooling/js/common.ts Revised utility helper functions for parsing and comment additions to align with the new API.
packages/core/tooling/js/array.ts Replaced push/unshift with append/prepend functions using an options parameter.
Various test files and addon integrations Adjusted tests and addon code to invoke the updated core API functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build code from strings more often
1 participant